package cn.xdwanj.service.impl

import cn.xdwanj.config.SpringRootConfig
import cn.xdwanj.service.EmpService
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner
import org.springframework.test.context.web.WebAppConfiguration

@WebAppConfiguration
@ContextConfiguration(classes = [SpringRootConfig::class])
@RunWith(SpringJUnit4ClassRunner::class)
class EmpServiceImpTest {

  @Autowired
  lateinit var empService: EmpServiceImp

  @Test
  fun test() {
    var list = empService.baseMapper.selectList(null)
    list.forEach {
      println("it = $it")
    }
  }

}